package com.durian.base.update.proxy.impl

import com.durian.base.update.entity.DownloadEntity
import com.durian.base.update.proxy.IApkInspector
import com.durian.base.utils.MD5
import com.durian.base.utils.StringUtils

/**
 * 说明：ApkMd5Inspector
 * <p/>
 * 作者：fanly
 * <p/>
 * 类型：Class
 * <p/>
 * 时间：2021/2/3 1:12 PM
 * <p/>
 * 版本：version 1.0
 */
class ApkMd5Inspector : IApkInspector{
    override fun inspect(entity: DownloadEntity) : Boolean{
        val md5 = MD5.getFileMd5(entity.apkFile)
        return StringUtils.isEqualsIgnoreCase(md5,entity.versionEntity.md5)
    }

}